package com.secsbrain.development.client.iface;

import com.secsbrain.development.client.model.Plan;
import com.secsbrain.development.client.model.TestResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.secsbrain.common.ResponseVo;

/**
 * 发布计划相关服务
 *
 * @author zhaoyi
 */
@FeignClient(value = "service-development-${development.env:dev}")
public interface PlanService {
	
	/**
     * 功能描述: <br>
     * 创建发布计划
     *
     */
    @RequestMapping(value = "/devservice/createPlan", method = RequestMethod.POST)
	ResponseVo<?> createPlan(@RequestBody Plan plan);
    
    /**
     * 功能描述: <br>
     * 修改发布计划
     *
     */
    @RequestMapping(value = "/devservice/updatePlan", method = RequestMethod.PUT)
	ResponseVo<?> updatePlan(@RequestBody Plan plan);
    
    /**
     * 功能描述: <br>
     * 删除发布计划
     * @param buildId  项目版本ID
     *
     */
    @RequestMapping(value = "/devservice/delPlan/{buildId}", method = RequestMethod.DELETE)
	ResponseVo<?> delPlan(@PathVariable("buildId") String buildId);
    
    /**
     * 功能描述: <br>
     * 测试结果回调
     *
     */
    @RequestMapping(value = "/devservice/testCallback", method = RequestMethod.POST)
	ResponseVo<?> testCallback(@RequestBody TestResult testResult);
    
}
